package com.geeksaga.dao.ibatis.mysql;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.geeksaga.dao.SecondaryCodeDao;
import com.geeksaga.dao.ibatis.BaseIBatisDao;
import com.geeksaga.domain.SecondaryCode;

/**
 * @author newbie
 * @since 0.1
 */
@Repository
public class SecondaryCodeDaoImpl extends BaseIBatisDao implements SecondaryCodeDao {

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#add(com.geeksaga.domain.SecondaryCode)
     */
    public SecondaryCode add(SecondaryCode secondaryCode) throws DataAccessException {
        return (SecondaryCode) getSqlMapClientTemplate().insert("SECONDARY_CODE.add", secondaryCode);
    }

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#count()
     */
    public int count() throws DataAccessException {
        return 0;
    }

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#find(com.geeksaga.domain.SecondaryCode)
     */
    public SecondaryCode find(SecondaryCode secondaryCode) throws DataAccessException {
        return null;
    }

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#findList()
     */
    @SuppressWarnings("unchecked")
    public List<SecondaryCode> findList() throws DataAccessException {
        return (List<SecondaryCode>) getSqlMapClientTemplate().queryForList("SECONDARY_CODE.findList");
    }
    
    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#findCacheList()
     */
    @SuppressWarnings("unchecked")
    public List<SecondaryCode> findCacheList() throws DataAccessException {
        return (List<SecondaryCode>) getSqlMapClientTemplate().queryForList("SECONDARY_CODE.findCacheList");
    }

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#modify(com.geeksaga.domain.SecondaryCode)
     */
    public SecondaryCode modify(SecondaryCode secondaryCode) throws DataAccessException {
        return null;
    }

    /* (non-Javadoc)
     * @see com.geeksaga.dao.SecondaryCodeDao#remove(com.geeksaga.domain.SecondaryCode)
     */
    public SecondaryCode remove(SecondaryCode secondaryCode) throws DataAccessException {
        return null;
    }
}